﻿@model TJBHJJ.Models.Product
@{
    ViewBag.Title = "修改案例";
            //if (IsAjax)
            //{
            //    Layout = null;
            //}
            //else
            //{
            //    Layout = "~/Views/Shared/_LayoutManager.cshtml";
            //}
}
<script type="text/javascript">
    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('#Descriptions',
        {
            allowFileManager: true,
            uploadJson: '/Manager/UploadImage'
        });
    });

    $(function () {
        $("#tabs").tabs();
    });
</script>
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">案例列表</a></li>
    </ul>
    <div id="tabs-1">
        @using (Html.BeginForm("EditProduct", "Manager", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.GuidId)
        @Html.HiddenFor(model => model.ClassId)
        @Html.HiddenFor(model => model.CompanyId)
        @Html.HiddenFor(model => model.ReadCount)
        @Html.HiddenFor(model => model.CreatDateTime)
        <table>
            <tr>
                <td style="width: 100px;">
                    案例名称：
                </td>
                <td>
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </td>
            </tr>
            <tr>
                <td>
                    附件下载：
                </td>
                <td>
                    @Html.HiddenFor(model => model.ProductPic)
                    <input type="file" name="file" />
                    @Html.ValidationMessageFor(model => model.ProductPic)
                </td>
            </tr>
            <tr>
                <td>
                    是否显示：
                </td>
                <td>
                    @Html.EditorFor(model => model.IsDispaly)
                    @Html.ValidationMessageFor(model => model.IsDispaly)
                </td>
            </tr>
            <tr>
                <td>
                    案例描述：
                </td>
                <td>
                    @Html.TextAreaFor(model => model.Descriptions, new { style = "width:700px;height:300px" })
                    @Html.ValidationMessageFor(model => model.Descriptions)
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="保存" />
        </p>
        }
        <div>
            @Html.ActionLink("返回列表", "ListProduct", new { page = (int)ViewData["pageIndex"] })
        </div>
    </div>
</div>
